<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

/**
 * Note: this view is intended only to be opened in a popup
 * @package Joomla
 * @subpackage JobBoard
 */
class JAJobBoardControllerJAJobBoard extends JAJobBoardController
{

	/**
	 * Custom Constructor
	 */	
	function __construct( $default = array()){
		parent::__construct( $default );
	}
	
	function display(){
		JRequest::setVar('view', 'jajobboard');	
		parent::display();
  	} 
  	
  	function reissue(){
  		checkPermission_Administrator('view_license');
  		$key = trim(JRequest::getString('license_key', '', '', JREQUEST_ALLOWHTML));
  		if(!$key){
  			JError::raiseWarning(1, JText::_('Please enter your license key.'));
  			$this->setRedirect('index.php?option=com_jajobboard&view=jajobboard&layout=documents');
  		}
		
  		$msg = '';
  		if( verify_new_license_key($key) ){
  			$msg = JText::_('License key update success.');
  		}
  		$this->setRedirect('index.php?option=com_jajobboard&view=jajobboard&layout=documents', $msg); 		
  		
  	}
}
?>
